package cn.hwm.proxy.staticproxy;

import cn.hwm.proxy.common.Person;
import cn.hwm.proxy.common.XiaoMing;

public class ProxyXiaoMing implements Person {

    private XiaoMing xiaoMing;

    public ProxyXiaoMing() {
        xiaoMing = new XiaoMing();
    }

    public void cat() {

        before();

        xiaoMing.cat();

        alter();

    }

    private void alter(){

        System.out.println("猪脚已经吃完了");

    }

    private void before(){

        System.out.println("小明要开始洗手吃猪脚了");

    }
}
